package com.example.spring.service;

import com.example.spring.config.Autowired;
import com.example.spring.config.BeanNameAware;
import com.example.spring.config.Component;

/**
 * <p>
 *
 * </p>
 *
 * @author gqz
 * @version 1.0
 * @since 2021/10/29:16:32
 */
@Component(value = "beanNameAware")
public class BeanNameAwareService implements BeanNameAware {

    @Autowired
    private AppService appService;

    private String name;

    @Override
    public void setName(String name) {
        this.name=name;
    }

    public void test()
    {
        System.out.println("name:"+name);
        System.out.println("appService:"+appService);
    }
}
